#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const long long N = 1e5 + 10;
int n, k;
typedef long long LL;
LL h[N], s[N];
LL hSum, sSum;

int main()
{
    cin >> n >> k;
    int count = 0;
    for (int i = 1; i <= n; i++) cin >> h[i];

    for (int i = 1; i <= n; i++) cin >> s[i];

    int r = 1, l = 1, ret = 0;
    LL hMax = 0, sMin = 0Xffff;

    while (r <= n)
    {
        hSum += h[r];
        sSum += s[r];
        while (r - l + 1 > k)
        {
            hSum -= h[l];
            sSum -= s[l];
            l++;
        }
        if (r - l + 1 == k)
        {
            if (hMax < hSum || (hMax == hSum && sMin > sSum))
            {
                hMax = hSum;
                sMin = sSum;
                ret = l;
            }
        }
        r++;
    }
    cout << ret << endl;

    return 0;
}